<style lang="less">
    @import '../../../styles/common.less';
</style>
<!--客服查询详情容器-->
<template>
 <Card>
     <Row>
         <h3>基本信息:</h3>
     </Row>
     <Row type="flex">
        <Col  order="1" style="width: 100%;">
            <basic-info-form :taskParams='taskParams'></basic-info-form>
        </Col>
    </Row>
    <Row>
         <h3>贷款信息:</h3>
     </Row>
    <Row type="flex">
        <Col  order="1" style="width: 100%;">
            <loan-info-form :taskParams='taskParams' :data="loanInfoForm"></loan-info-form>
        </Col>
    </Row>
    <Row>
         <h3>贷款合同:</h3>
     </Row>
    <Row type="flex">
        <Col  order="1" style="width: 100%;">
            <contract-info-form :taskParams='taskParams' :data="loanInfoForm"></contract-info-form>
        </Col>
    </Row>
    <Row>
         <h3>还款计划:</h3>
     </Row>
     <Row type="flex">
        <Col  order="1" style="width: 100%;">
            <repayment-plan-info-form :taskParams='taskParams'></repayment-plan-info-form>
        </Col>
    </Row>
            <!-- <Tabs v-model="curTab" @on-click="clickTab">
                <TabPane label="基本信息" name="basicInfo">
                    <basic-info-form :taskParams='taskParams'></basic-info-form>
                </TabPane>
                <TabPane label="贷款信息" name="loanInfo">
                    <loan-info-form :taskParams='taskParams'></loan-info-form>
                </TabPane>
                <TabPane label="贷款合同" name="contractInfo">
                    <contract-info-form :taskParams='taskParams'></contract-info-form>
                </TabPane>
                <TabPane label="还款计划" name="repaymentPlanInfo">
                    <repayment-plan-info-form :taskParams='taskParams'></repayment-plan-info-form>
                </TabPane>
            </Tabs> -->

 </Card>
</template>
<script>
import basicInfoForm from './basic-info.vue'
import loanInfoForm from './loan-info.vue'
import contractInfoForm from './contract-info.vue'
import repaymentPlanInfoForm from './repayment-plan-info.vue'
export default {
  name: 'customer-service-detail-compont',
  components: {
    basicInfoForm,
    loanInfoForm,
    contractInfoForm,
    repaymentPlanInfoForm
  },
  data () {
    return {
      taskParams: {// 传递给子tab的参数对象
        loanId: this.$route.query.id, //
        // custCardNo:null,//身份证
        // customerInfo:false,//tab页签name，默认不加载数据
        loanInfo: false,
        contractInfo: false,
        repaymentPlanInfo: false
      },
      curTab: null,
      $ajax: null,
      loanInfoForm: {},
      baseUrl: this.$appContext.marvels_core_loanapply
    }
  },
  methods: {
    initLoanInfo () {
      var vm = this
      var url = vm.baseUrl + 'loanApply/customerservice/query/service/findLoanContractInfo'
      var param = {
        loanId: vm.$route.query.id
      }
      vm.$ajax.post(url, param).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        vm.loanInfoForm = data.data
      }).catch(er => {

      })
    }

  },
  computed: {

  },
  created () {
    this.$ajax = this.$util.ajax()
    Object.assign(this.taskParams, this.comptParams)
    this.initLoanInfo()
  },
  props: {
    comptParams: Object
  }
}
</script>
